#ifndef IWIDGETS_H
#define IWIDGETS_H

#include "iapplication.hpp"

#include "common.hpp"

////////////
// Window //
////////////

class IWindow : virtual public IWidget
{
	// todo
	enum Size {
		Fullsize,
		Values
	};

public:
	IWindow() {

	}

	virtual void setPosition(int, int) = 0;
	virtual void setTitle(const char *) = 0;
};

////////////
// Button //
////////////

class IButton : virtual public IWidget {

public:
	IButton() {

	}

	// TODO: Setters / Getters

	virtual void setCaption(const char *) = 0;
	virtual std::string caption() const = 0;
	
};


///////////
// Label //
///////////

class ILabel : virtual public IWidget {

public:
	virtual void setText(std::string&) = 0;
	virtual std::string getText() = 0;
	
};


/////////////////
// Checkbutton //
/////////////////

class ICheckButton : virtual public IWidget {

public:
	virtual void setCaption(const char*) = 0;
	virtual std::string getCaption() = 0;
	virtual bool checked() = 0;
	virtual void setChecked(bool) = 0;
};

/////////////////
// Radio group //
/////////////////

class IRadioGroup : virtual public IWidget {


public:
	virtual void setCaption(const char *) = 0;
};


//////////////////
// Radio button //
//////////////////

class IRadioButton : virtual public IWidget {
	
public:
	virtual bool checked() = 0;
	virtual void setChecked(bool) = 0;
	
	// todo: caption getters & setters

	virtual char* getCaption() const = 0;
};

///////////////
// Text box  //
///////////////

class ITextBox : virtual public IWidget {
	
public:
	enum Mode {
		Single,
		Multi
	};

	virtual std::string text() = 0;
	virtual void setText(const char*) = 0;
	virtual void appendText(const char*) = 0;
	virtual void setEditable(bool) = 0;
	
	
};

///////////////
// Scrollbar //
///////////////

class IScrollbar : virtual public IWidget {

public:
	enum Orientation {
		Horizontal,
		Vertical
	};

	virtual int current() = 0;
	virtual void setCurrent(const int&) = 0;
};

//////////////////
// Progress bar //
//////////////////

class IProgressBar : virtual public IWidget {

public:
	virtual int current() const = 0;
	virtual void setCurrent(const int&) = 0;
};

////////////////
// Raw widget //
////////////////

class IRawWidget : virtual public IWidget
{

};

////////////
// Drawer //
////////////

class IDrawer
{
private:
	IWidget *draw_surface;
public:
	IDrawer(IWidget *srf) : draw_surface(srf)
	{ }
	
	virtual void line(int x1, int y1, int x2, int y2) = 0;
	
};

#endif


